namespace ts5 {

    //Boolean、Number、string、RegExp、Date、Error

    let b: Boolean = new Boolean(1)
    console.log(b)

    let nn: Number = new Number(true)
    console.log(nn)

    let s: String = new String('哔哩哔哩关注嘉然今晚吃什么')
    console.log(s)

    let d: Date = new Date()
    console.log(d)

    let r: RegExp = /^1/
    console.log(r)

    // let e: Error = new Error('error!')
    // console.log(e)

    //DOM 和 BOM 的内置对象

    // let body: HTMLElement = document.body;
    // let allDiv: NodeList = document.querySelectorAll('div')
    // let div: HTMLElement = document.querySelector('div') as HTMLElement
    // document.addEventListener('click', function (e: MouseEvent) { })



    function promise(): Promise<number> {
        return new Promise<number>((resolve, reject) => {
            resolve(1)
        })
    }
    promise().then((res) => {
        console.log(res)
    })





}

